﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YongHuXX_DXS.aspx.cs" Inherits="Web.Pages.QuShui.XiTongJK.YongHuXX_DXS"  Theme="Default"%>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script type="text/javascript">
        function QueryDate() {
            if (txtShuiLiangYM.GetText() == "") {
                alert("水量年月不能为空！");
            }
            else {
                gvYHXX.PerformCallback();
            }
        }

        function SetListChecked() {
            var len = gvYHXX.GetVisibleRowsOnPage();
            for (var i = 0; i < len; i++) {
                var clientObject = ASPxClientCheckBox.Cast('checked' + i);
                if (clientObject.GetChecked()) {
                    clientObject.SetChecked(false);
                }
                else{
                    clientObject.SetChecked(true);
                }
            }
        }

         
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            用户信息
        </div>
       <%-- <div style="display: none;">
            <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
            <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        </div>--%>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <table style="width:100%">
                        <tr>
                            <td style="width:60px;"><span style="font-size: 12px;">水量年月：</span></td>
                            <td style="width:100px;">
                                <dx:ASPxTextBox runat="server" ID="txtShuiLiangYM" Width="60%" ClientInstanceName="txtShuiLiangYM">
                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);if (event.keyCode == 13) { QueryDate(); };}" />
                                </dx:ASPxTextBox>
                            </td>
                            <td style="float:right;"> 
                                <dx:ASPxButton runat="server" ID="btnExport" Text="导出excel" UseSubmitBehavior="false" OnClick="btnExportExcel_Click">
                                </dx:ASPxButton>&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td>
                                <dx:ASPxButton runat="server" ID="btn" Text="传输到水务局">
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxLabel ID="zjl" Text="共0条" runat="server" ForeColor="Blue"></dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <dx:ASPxGridView ID="gvYHXX" ClientInstanceName="gvYHXX" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%" OnCustomCallback="gvYHXX_CustomCallback">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="" Width="50" >
                                    <HeaderTemplate><%--OnCheckedChanged="cbAll_CheckedChanged" --%>
                                         <dx:ASPxCheckBox ID="cbAll" ClientInstanceName="cbAll" runat="server" ClientSideEvents-CheckedChanged="function(s,e){SetListChecked();}" Checked="true" ></dx:ASPxCheckBox>  
                                    </HeaderTemplate>
                                    <DataItemTemplate>
                                        <dx:ASPxCheckBox ID="cid" ClientInstanceName="cid" runat="server" ></dx:ASPxCheckBox>    
                                        <%--<input id="cid"  runat="server"/> --%>           
                                        <asp:HiddenField ID="id" runat="server" Value='<%#Eval("ROWNUM") %>' />
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="60" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="200"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="N_SHUIJIA" Caption="水价" Width="50" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_XINGZHENGQM" Caption="行政区" Width="60" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="HXNW" Caption="环线标记" Width="75" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_QUSHUIMC" Caption="取水用途" Width="75" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_LIUYUMC" Caption="流域" Width="65" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_SHUILIFPMC" Caption="水资源分区" Width="75"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_ZHUANGBIAOJL" Caption="装裱计量" Width="75"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_LIANXIR" Caption="联系人" Width="75"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_LIANXIBM" Caption="联系部门" Width="200"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YOUBIAN" Caption="邮编" Width="75"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_DIANHUA" Caption="联系电话" Width="125"></dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="地址" Width="200"></dx:GridViewDataTextColumn>

                        </Columns>
                        <SettingsPager PageSize="50"></SettingsPager>
                        <ClientSideEvents  Init="function(s,e){AdjustSize(105,gvYHXX);}"  />
                        <%--BeginCallback="function(s,e){HiddenListValue.Set('RowsCount',gvYHXX.GetVisibleRowsOnPage());}"--%>
                        <Settings VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                        <SettingsBehavior ProcessFocusedRowChangedOnServer="false" />
                    </dx:ASPxGridView>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
